home *** CD-ROM | disk | FTP | other *** search
/ World of Video / World of Video.iso / gfxprograms / 3dprograms / vertex / docs / multiply.doc < prev    next >
Text File  |  1995-02-13  |  8KB  |  196 lines

  1.  
  2. Multiply Document - Hints and tips on getting th emost use out of Vertex's
  3.                     multiply feature.
  4.  
  5.  
  6. The multiply command lets you apply any mathematical formula to any set of
  7. selected vertices. You are limited to affecting 1 axis at a time, ie.
  8. either X=, Y= or Z=.
  9.  
  10. For the unitiated, this feature probably seems useless. "I don't know
  11. anything about math - I'm an artist!", might be what your saying to
  12. yourself. If this is the case, then I strongly urge you to read this
  13. document. It will not explain the rules and details of mathematics, but it
  14. will give you some formulas, with explainations, which could produce just
  15. the effect your looking for.
  16.  
  17.  
  18. Lets start by getting a feel for how the Multiply command works. With any
  19. object selected, activate the Multiply command under the Modify menu. To
  20. quickly erase the current formula, press and hold the right Amiga key,
  21. then press the X key.
  22.  
  23. Now, enter the following formula:
  24.  
  25. X=X
  26.  
  27. (This may not look like a formula, but it is!)
  28.  
  29. Before pressing return, try to guess what will happen. Ask yourself, "What
  30. is being changed." If you answered the X coordinate of all selected
  31. vertices, then you are correct. Thats what the X= part of the formula
  32. means. We will be assigning some value to the X coordinate of every
  33. selected vertex. Now, ask yourself, "What are we assigning to the X
  34. coordinate?"
  35.  
  36. Well, for this example, the answer is - the original X coordinate. The net
  37. effect of this is that there will be no change to the object. We will be
  38. assigning the original X coordinate to the new X coordinate. If your
  39. saying, "Wow, thats pretty useless", your right. However, I wanted to get
  40. the point across about how the axis on the left of the equation, the X=,
  41. is what will be assigned a new value. And, this value is based on the
  42. right hand side of the equation.
  43.  
  44. Now, lets take our example a little further. Lets alter our "useless"
  45. equation into something we can use:
  46.  
  47. X=X*2
  48.  
  49. Examine this equation. Ask yourself, "What is being changed?" and "What is
  50. it being changed to?" Lets run through it.
  51.  
  52. We are changing the X coordinate (I hope this is clear now). Now, how are
  53. we changing the X coordinate? We are taking the original X coordinate and
  54. multiplying it by a factor of 2. So, every selected vertices X coordinate
  55. will be doubled. If your think this sounds alot like a scale command, you
  56. are right. This particular formula will double the width, or X axis, of an
  57. object. If we did this in the traditional 3D object editor, we would use
  58. the scaling command, and enter a value of 2 for the X axis. True, Vertex
  59. has a scale command and this is not that "useful" of a function, but it
  60. does open up some new possibilities.
  61.  
  62. Lets take our example a quantum leap forward. Examine this formula, and
  63. try to figure out what will happen:
  64.  
  65. X=X+Y
  66.  
  67. Again, we will be affecting the X axis, as shown by the X= in the
  68. equation. Now we must ask, "What is the X axis being changed to?"
  69.  
  70. We will be taking the X coordinate of the vertex and adding the Y
  71. coordinate to it. Do you know what this will produce? I'd highly suggest
  72. trying it now, as I'm sure you can find it useful.
  73.  
  74. If you have tried it, you will see that this is a "shear" command. With it
  75. we can tilt a 3D object, or make 3D text italic. Pretty neat, eh? We have
  76. only just begun to make use of the Multiply command.
  77.  
  78. ==========================================================================
  79.  
  80. After playing with simple addition and multiplication of vertices, you
  81. will prbably discover most of the functions under the Transform Menu:
  82. Move, Scale and Size.
  83.  
  84. With the addition of some simple trig formulas, we can open a whole new
  85. world of math. Please, don't be intimidated by the trig formulas - we will
  86. not be talking about theory! We will be giving you some useful examples of
  87. actually using the functions.
  88.  
  89. Lets start with Cosine. Cosine is a trig function, and it is pretty
  90. useful. It will return a value between -1 and 1. This value will be
  91. circular, or wavy. The COS function should look like this:
  92.  
  93. COS( X ) or COS( Y ) or COS( Z )
  94.  
  95. Notice how there is COS, then an opening parenthesis, then a letter
  96. representing an axis, then a closing parenthesis. The letter of the axis
  97. is important, if we simply put a number in there, say COS( 10 ), we would
  98. always get the same result. When we put an axis in the middle of the
  99. parentheses, we get a varying, or wavy, result.
  100.  
  101.  
  102. We can use it to map a wave onto an object:
  103.  
  104. Z=cos(x)
  105.  
  106. Lets take a minute to talk about the function before we really try it out.
  107. First, it should be obvious that we are affecting, or changing, the Z axis
  108. of the object. Now, we ask "What is the Z axis is being changed to?" The Z
  109. axis will be assigned the COS of the value of the X coordinate. As the X
  110. coordinate changes, the Z coordinate will be the COS of that x coordinate.
  111.  
  112. If this is confusing, (it is very difficult to explain with words), don't
  113. worry - we'll look at an example.
  114.  
  115. If we used the formula Z=cos(x), we will probably be a little
  116. disappointed. The object will look rather flat after applying the formula.
  117. The reason is that we changed the Z coordinate to be the cosine of the X
  118. coordinate. The cosine function only returns values between -1 and 1. To
  119. fix this we need to change the formula a bit:
  120.  
  121. Z=cos(x)*20
  122.  
  123. Now that we've added the *20 to the equation, we will scale the new Z
  124. coordinate by 20. Type in this example, ans check out the effect. (Make
  125. sure you have some vertices selected!)
  126.  
  127. The *20 is considered a scaling factor, or the amplitude. In this case,
  128. the Z coordinate will have coordinates any where from -20 to +20. So, by
  129. changing this value, we can change the size of the waves.
  130.  
  131. Before we leave the cosine function, lets talk about 1 more thing -
  132. frequency. The frequency can be explained as the number of bumps, or high
  133. points, in a cosine wave.
  134.  
  135.  
  136.   **                                    **
  137.     ***                              ***  
  138.        **                          **     
  139.          *                        *       
  140.           *                      *
  141.            *                    *
  142.             *                  *
  143.              *                *
  144.               *              *
  145.                **          **
  146.                  ***    ***
  147.                     ****
  148.  
  149. To change the the frequency of a wave, we must scale the input. Here's an
  150. example:
  151.  
  152. Z=cos(x * 2)*20
  153.  
  154. Now we've changed our cosine formula to create twice as many high
  155. points, or complete waves, in the object. If you tried the cosine example,
  156. and found it gave you too few waves, then you can experiment with this
  157. scaling factor to increase the number of waves in the object.
  158.  
  159. So, here is, finally, a really useful example. You now have the ability to
  160. make waves in your objects!
  161.  
  162. To help you along, here are some hints/tips on using the cosine function:
  163.  
  164. .   The size of the original object is very important. You can use the
  165.     same formula on 2 objects of different sizes, and get very different
  166.     results.
  167. .   If you object is centered on the origin, then you will get symmetrical
  168.     results. Try moving the object on any axis before applying the
  169.     formula, and see what you get.
  170. .   Fairly large objects with few vertices, may result in a rather poor
  171.     effect. If this is a problem, try subdividing the object, or scaling
  172.     it down.
  173. .   Don't hesitate to experiment! You may come up with some real
  174.     interesting results just by changing the formula a little bit.
  175.  
  176. ==========================================================================
  177.  
  178. SIN is a trig function, as is cosine. In fact it is very similar to
  179. cosine, except the high point of the sine wave is the low point of the
  180. cosine wave.
  181.  
  182. To see the effect of this difference, create an object, (a grid works the
  183. best), and apply the following formula:
  184.  
  185. Z=sin(x*2)*30
  186.  
  187. After this function returns, you will see an effect similar to the COS
  188. example above. Now, duplicate the object with Add-Duplicate, and apply
  189. this formula to the duplicated object:
  190.  
  191. Z=cos(x*2)*30
  192.  
  193. You will see how the waves are the mirror image of each other, across the
  194. Z axis.
  195.  
  196.